package com.yxw.live_vod_boot.dto;



import com.yxw.live_vod_boot.entity.YxLiveUserWatchDurationEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
//import lombok.EqualsAndHashCode;



/*** 
*@author Jiaxu.Huang
*@date 2023/12/27 16:58:09
*@update 2023/12/27 16:58:09
**/
@Data
//@EqualsAndHashCode(callSuper = true)
public class YxLiveUserWatchDurationAddDTO   implements Serializable
{
    private static final long serialVersionUID = 11703667489975L;
    /**
    *主键Id
    */
    @NotNull(message = "主键Id不可为空")
    @ApiModelProperty(value = "主键Id")
    private Long Id;
    /**
    *用户内部Id
    */
    @ApiModelProperty(value = "用户内部Id")
    private Long userInnerId;
    /**
    *店铺内部Id
    */
    @ApiModelProperty(value = "店铺内部Id")
    private Long liveShopId;
    /**
    *直播Id
    */
    @ApiModelProperty(value = "直播Id")
    private String liveId;
    /**
    *最大观看时长
    */
    @ApiModelProperty(value = "最大观看时长")
    private Long maxDuration;
    /**
    *创建时间
    */
    @ApiModelProperty(value = "创建时间")
    private Long createTime;
    /**
    *最后更新时间
    */
    @ApiModelProperty(value = "最后更新时间")
    private Long updateTime;
    /**
    *将DTO转换为ENTITY
    */
    public YxLiveUserWatchDurationEntity ConverToEntity()
    {
        YxLiveUserWatchDurationEntity oYxLiveUserWatchDurationEntity = new YxLiveUserWatchDurationEntity ();
        oYxLiveUserWatchDurationEntity.setId(Id);
        oYxLiveUserWatchDurationEntity.setUserInnerId(userInnerId);
        oYxLiveUserWatchDurationEntity.setLiveShopId(liveShopId);
        oYxLiveUserWatchDurationEntity.setLiveId(liveId);
        oYxLiveUserWatchDurationEntity.setMaxDuration(maxDuration);
        oYxLiveUserWatchDurationEntity.setCreateTime(createTime);
        oYxLiveUserWatchDurationEntity.setUpdateTime(updateTime);
        return oYxLiveUserWatchDurationEntity;
    }
}

